package com.ruoyi.myplayer.controller;

import cn.hutool.http.HttpUtil;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.myplayer.domain.*;
import com.ruoyi.myplayer.mapper.PlayerAlbumMapper;
import com.ruoyi.myplayer.mapper.PlayerSingerMapper;
import com.ruoyi.myplayer.mapper.PlayerSongMapper;
import com.ruoyi.myplayer.mapper.PlayerVideoMapper;
import com.ruoyi.myplayer.service.HomeService;
import com.ruoyi.util.PinyinUtil;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.nodes.Node;
import org.jsoup.select.Elements;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * @author lvyq
 * @version 1.0
 * Create by 2025-02-20 16:24
 */
@RestController
@RequestMapping("/myplayer/home")
public class HomeController extends BaseController {

    @Resource
    private HomeService homeService;

    @Resource
    private PlayerAlbumMapper playerAlbumMapper;

    @Resource
    private PlayerSingerMapper playerSingerMapper;

    @Resource
    private PlayerSongMapper playerSongMapper;

    @Resource
    private PlayerVideoMapper playerVideoMapper;

    @GetMapping("/list")
    public TableDataInfo list(HomeBean homeBean)
    {
        startPage();
        List<HomeBean> list = homeService.list(homeBean);
        return getDataTable(list);
    }

}

